package com.tsl.prevention.modules.shop.controller;


import com.tsl.prevention.modules.shop.entity.Goods;
import com.tsl.prevention.modules.shop.service.IGoodsService;
import com.tsl.prevention.util.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author Lionel
 * @since 2021-03-25
 */
@RestController
@RequestMapping("/shop/goods")
public class GoodsController {
    @Autowired
    IGoodsService iGoodsService;

    @GetMapping("/getList")
    public Result getList() {
        List<Goods> list = iGoodsService.list();
        return Result.create(list);
    }
}

